<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>商品升级</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    
    <link rel="stylesheet" href="../public/lobster/css/public.css">
    <link rel="stylesheet" href="../public/lobster/icon/iconfont.css">
    <link rel="stylesheet" href="../public/lobster/css/shared.css?77777">
    <link rel="stylesheet" href="../public/lobster/css/href.css?2170402">
    <script src="../public/lobster/js/public.js"></script>
    <script src="../public/lobster/js/lick.js"></script>
    <script src="../public/lobster/js/click.js"></script>
    <script src="../public/lobster/js/jq-2.1.0.js"></script>
</head>
<body class="jiou">
<div class="head-logo">
    <input type="hidden" id="jiou">
        <div class="main-title">
			<audio src="../public/lobster/images/ji.mp3" id="jimusic"></audio> 
	 		<audio src="../public/lobster/images/ou.mp3" id="oumusic"></audio> 
   		</div>
  
    <div class="xxy-sjz">
    	<img class="xxy-sjz-1" src="../public/lobster/images/muban.png" /> 
    	<img class="xxy-sjz-2" src="../public/lobster/images/sjzhong.png" /> 
    	
    	<img class="cp1" src="http://dqimgs.shdqdzsw.com/F973SbtIIzzEzXWwmYaYsPUQ.png" />
    	<img class="cp2" src="http://dqimgs.shdqdzsw.com/yLe6RbLstEm6mje1H-f2gD0t.png" />
    	<p class="name1">竹炭牙刷1支</p>
    	<p class="name2">软毛长柄搓澡刷</p>
    	<p class="price1">19.0</p>
    	<p class="price2">30.78</p>
    </div>
    <div class="twohead">
        <div class="two-main">
            <ul>
                <li>
                	<img class="base" src="../public/lobster/images/jion.png" alt="" onclick="change(this)">
                	
                </li>
                <li>
                	<img class="even" src="../public/lobster/images/ou.png" alt="" onclick="change(this)">
               
                </li>
            </ul>
            <img id="start_up" class="start_up" src="../public/lobster/images/shengji.png" alt="">
        </div>
    </div>
</div>
<header>
    <div class="quote">
        <div class="quote-detail">
            <table>
                <thead>
                <tr>
                    <th>开奖时间</th>
                    <th>开奖号码</th>
                    <th>结果</th>
                </tr>
                </thead>
                <tbody>
                
	                <tr>
	                    <td>2017-10-09 15:39:59</td>
	                    <td>79303</td>
	                    <td>
		                    
		                    
		                    <span class="cold">鸡</span>
		                    
						</td>
	                </tr>
                
	                <tr>
	                    <td>2017-10-09 15:29:59</td>
	                    <td>76906</td>
	                    <td>
		                    
		                    <span class="hot">藕</span>
		                    
		                    
						</td>
	                </tr>
                
	                <tr>
	                    <td>2017-10-09 15:19:59</td>
	                    <td>87000</td>
	                    <td>
		                    
		                    <span class="hot">藕</span>
		                    
		                    
						</td>
	                </tr>
                
	                <tr>
	                    <td>2017-10-09 15:09:59</td>
	                    <td>06032</td>
	                    <td>
		                    
		                    <span class="hot">藕</span>
		                    
		                    
						</td>
	                </tr>
                
	                <tr>
	                    <td>2017-10-09 14:59:59</td>
	                    <td>81351</td>
	                    <td>
		                    
		                    
		                    <span class="cold">鸡</span>
		                    
						</td>
	                </tr>
                
                </tbody>
            </table>
        </div>
    </div>
    <div class="countdown">下期开战时间：<span class="seconds">258982</span></div>
    <!--下单弹窗-->
    <div class="morder" id="morder">
        <div class="popu">
            <div class="popu-title"><i class="iconfont icon-tishi"></i> 下单</div>
            <p class="popu-main">
                您升级得是鸡，确认下单吗？
            </p>
            <div class="btn">
                <!-- <a href="javascript:void(0);" class="pay" id="enter" onclick="success('81251a2fdb7b4b94bcb929a3e7b8da12','50000120')">升级</a> -->
                <a href="javascript:void(0);" class="pay" id="enter" onclick="success1()">升级</a>
                <a href="#" class="settle">取 消</a>
            </div>
            <script type="text/javascript">
                function success1() {
                    alert('押注成功！');
                    window.location.reload();
                }
            </script>
        </div>
    </div>
     <div class="morder" id="morder1">
		<div class="popu">
			<div class="popu-title">
				<i class="iconfont icon-tishi"></i> 提示
			</div>
			<div class="popu-main">
				<h3>升级规则</h3>
				<p>
					1. 为回馈广大新老用户对尚品商城的长期支持，现推出升级促销活动，用户购买促销商品可参与本活动。
				</p>
				<p>
					2. 参与促销时，判断该期结果为鸡或是藕，判断成功可获得大升级资格，判断失败可获得小升级资格。
				</p>
				<p>
					3. 如需查看最新一期开奖期号，请点击<a href="http://www.lecai.com" style="color:#ad0006;text-decoration:underline!important;font-size:.28rem;">重庆时时彩</a>。
				</p>
			</div>
			<div class="btn">
				<a href="javascript:void(0);" class="pay" onclick="coulseTY()">同意</a> <a href="depot.html"
					class="settle" >再想想</a>
			</div>
		</div>
	</div>
	
		<div class="href">
      	    <a href="lotteryInfo.html">
      	    	榜
      	    </a> 
        	<a href="center.html">
				<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1493966935986" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3765" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M632.855273 565.992727c101.771636-47.080727 172.590545-149.317818 172.590545-267.869091 0-163.118545-133.678545-295.842909-298.007273-295.842909C343.202909 2.280727 209.454545 135.005091 209.454545 298.077091c0 118.597818 70.842182 220.834909 172.590545 267.915636C188.020364 622.336 44.311273 805.329455 38.469818 1024l46.615273 0 844.753455 0 46.638545 0C970.612364 805.329455 826.926545 622.336 632.855273 565.992727z" p-id="3766"></path></svg>
        	</a>
        	<a href="index.html" class="iconfont icon-zhuye1"></a>
       </div>
		
	
</header>

</body>
<script src="../public/lobster/js/jq-2.1.0.js"></script>
 <script src="../public/lobster/js/explain.js"></script>
 <script src="../public/lobster/js/xxpopup.js"></script>
 <script type="text/javascript">orderInfo('');</script>
<script>
function preventDefault(e) { e.preventDefault(); };  

$(function(){
	var qh = null;
	
	//弹出协议
	if(qh != 1){
		$('#morder1').css('display','block');
		$('html').css("overflow",'hidden');
	}
});
function coulseTY(){
	// $.post(
 //    		'/user/enterQH',
 //    		{},
 //    		function(data){
 //    			if(data.success){
	//     			window.location.reload();
 //    			}else{
 //    				window.location.reload();
 //    			}
 //    		}
 //    	);
        $('#morder1').css('display','none');
        $('html').css("overflow",'hidden');
}

timing();
function timing(){
    setInterval(function(){
        var second=parseInt($('.seconds').html());
        if(second<=0&&second>-3000){
            $('.countdown').html("正在升级中....");
            setInterval(function(){
            	window.location.reload();
            },3000);
        
        }else{
            second=second-9;
            $('.seconds').html(second+"毫秒");
        }
    },9)
}
    //        下单弹窗
    $('#start_up').on('click',function(){
        $(window).scrollTop(0);
        $('.twohead>p img').animate({width:"80%"},100,function(){
            $(this).css({width:"100%"});
        });
        $('#morder').css('display','block');
        window.parent.document.body.addEventListener('touchmove',preventDefault,false);
        $('.settle').bind('click',function(){
        	 window.parent.document.body.removeEventListener('touchmove',preventDefault,false);
            $('#morder').css('display','none');
        })
        var jiouVal = $("#jiou").val();
        if(jiouVal == ''){
        	jiouVal = '鸡';
        }
       	$(".popu-main").html("您升级的是"+jiouVal+"，确认下单吗？");
    })
    
    function change(obj){
        var name=$(obj).attr('class');
        if(name=='base'){
            $(obj).attr('src',"../public/lobster/images/jion.png");
            $('.even').attr('src',"../public/lobster/images/ou.png");
            $("#jiou").val("鸡");
            jimusic.play(); 
        }else{
            $(obj).attr('src',"../public/lobster/images/ouon.png");
            $('.base').attr('src',"../public/lobster/images/ji.png");
            $("#jiou").val("藕");
            oumusic.play();
        }
    }
    
    function success(depotId,goodsId){
    	//alert(depotId);
    	var direction = 1;
    	var jiouVal = $("#jiou").val();
        if(jiouVal == '鸡'){
        	direction = 1
        }else if(jiouVal == '藕'){
        	direction = 0;
        }
        /* alert(orderId);
        alert(direction); */
        $("#morder").hide();
    	$.post(
    		'/igkbet/promote',
    		{
    			depotId : depotId,
    			direction : direction,
    			goodsId : goodsId,
    		},
    		function(data){
                
		             // 铃声 
					var audio=document.createElement("audio");
			        audio.src='../public/lobster/video/dingding.mp3';
			        audio.play();
                	 
    			   if(data.success==true){
    				/* alert(data.msg); */
    				/* datamsg.toString(data.msg); */
    				 xxone.popup("提示",data.msg,"确认"); 
    				
    				 $('#xxone-popup-done').bind('click',function(){
    						window.location.href="/user/depot"; 
    				  });
    						
    			   }else{
    				 xxone.popup("提示",data.msg,"确认");
        				$('#xxone-popup-done').bind('click',function(){
        					window.location.reload();
    				  	}); 
    			   }                
    		 	//}
    		});
    	
    }
</script>
</html>